package com.dynamixsoftware.printershare;

import android.content.Intent;
import android.content.res.Resources;
import android.database.DataSetObserver;
import android.net.Uri;
import android.os.Bundle;
import android.os.Environment;
import android.util.DisplayMetrics;
import android.view.KeyEvent;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.LinearLayout.LayoutParams;
import android.widget.ListAdapter;
import android.widget.ListView;
import android.widget.TextView;
import java.io.DataInputStream;
import java.io.File;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import java.util.Vector;

public class ActivityDocsBrowser
  extends ActivityRoot
{
  private DirAdapter adapter;
  private ListView list;
  
  public void onCreate(Bundle paramBundle)
  {
    super.onCreate(paramBundle);
    float f = getResources().getDisplayMetrics().density;
    this.list = new ListView(this);
    this.list.setPadding(0, (int)(5.0F * f), 0, 0);
    this.list.setCacheColorHint(0);
    this.list.setOnItemClickListener(new AdapterView.OnItemClickListener()
    {
      public void onItemClick(AdapterView<?> paramAnonymousAdapterView, View paramAnonymousView, int paramAnonymousInt, long paramAnonymousLong)
      {
        int i = ((Integer)paramAnonymousView.getTag()).intValue();
        if (i > ActivityDocsBrowser.this.adapter.getCount()) {
          return;
        }
        File localFile = (File)ActivityDocsBrowser.this.adapter.getItem(i);
        if (localFile.isDirectory())
        {
          ActivityDocsBrowser.this.adapter.changeDir(localFile);
          return;
        }
        Uri localUri = Uri.fromFile(localFile);
        Intent localIntent = new Intent("android.intent.action.VIEW");
        String str1 = localFile.getName().toLowerCase();
        String str2 = "application/octet-stream";
        if (str1.endsWith(".jpg")) {
          str2 = "image/jpeg";
        }
        if (str1.endsWith(".png")) {
          str2 = "image/png";
        }
        if (str1.endsWith(".txt")) {
          str2 = "text/plain";
        }
        if (str1.endsWith(".pdf")) {
          str2 = "application/pdf";
        }
        if (str1.endsWith(".doc")) {
          str2 = "application/msword";
        }
        if (str1.endsWith(".docx")) {
          str2 = "application/vnd.openxmlformats-officedocument.wordprocessingml.document";
        }
        if (str1.endsWith(".xls")) {
          str2 = "application/vnd.ms-excel";
        }
        if (str1.endsWith(".xlsx")) {
          str2 = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
        }
        if (str1.endsWith(".ppt")) {
          str2 = "application/vnd.ms-powerpoint";
        }
        if (str1.endsWith(".pptx")) {
          str2 = "application/vnd.openxmlformats-officedocument.presentationml.presentation";
        }
        if (str1.endsWith(".hwp")) {
          str2 = "application/haansofthwp";
        }
        if (str2.startsWith("image/")) {
          localIntent.setClass(ActivityDocsBrowser.this, ActivityPrintPictures.class);
        }
        for (;;)
        {
          localIntent.setDataAndType(localUri, str2);
          ActivityDocsBrowser.this.startActivity(localIntent);
          return;
          if (str2.equals("application/pdf")) {
            localIntent.setClass(ActivityDocsBrowser.this, ActivityPrintPDF.class);
          } else {
            localIntent.setClass(ActivityDocsBrowser.this, ActivityPrintDocuments.class);
          }
        }
      }
    });
    setContentView(this.list);
    setTitle(2131099702);
    this.adapter = new DirAdapter();
    this.list.setAdapter(this.adapter);
  }
  
  public boolean onKeyDown(int paramInt, KeyEvent paramKeyEvent)
  {
    if ((paramInt == 4) && (this.adapter.getCount() > 0) && (this.adapter.curr != null) && ((this.adapter.roots.size() != 1) || (!((Volume)this.adapter.roots.elementAt(0)).equals(this.adapter.curr))))
    {
      this.adapter.changeDir((File)this.adapter.getItem(0));
      return true;
    }
    return super.onKeyDown(paramInt, paramKeyEvent);
  }
  
  class DirAdapter
    implements ListAdapter
  {
    private File curr;
    private Vector<File> files;
    private List<DataSetObserver> observers;
    private Vector<ActivityDocsBrowser.Volume> roots;
    
    /* Error */
    public DirAdapter()
    {
      // Byte code:
      //   0: aload_0
      //   1: aload_1
      //   2: putfield 26	com/dynamixsoftware/printershare/ActivityDocsBrowser$DirAdapter:this$0	Lcom/dynamixsoftware/printershare/ActivityDocsBrowser;
      //   5: aload_0
      //   6: invokespecial 29	java/lang/Object:<init>	()V
      //   9: aload_0
      //   10: aconst_null
      //   11: putfield 31	com/dynamixsoftware/printershare/ActivityDocsBrowser$DirAdapter:observers	Ljava/util/List;
      //   14: aload_0
      //   15: new 33	java/util/Vector
      //   18: dup
      //   19: invokespecial 34	java/util/Vector:<init>	()V
      //   22: putfield 36	com/dynamixsoftware/printershare/ActivityDocsBrowser$DirAdapter:roots	Ljava/util/Vector;
      //   25: ldc 38
      //   27: ldc 40
      //   29: iconst_1
      //   30: anewarray 42	java/lang/Class
      //   33: dup
      //   34: iconst_0
      //   35: ldc 44
      //   37: aastore
      //   38: invokevirtual 48	java/lang/Class:getMethod	(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;
      //   41: aload_1
      //   42: invokevirtual 54	com/dynamixsoftware/printershare/ActivityDocsBrowser:getPackageManager	()Landroid/content/pm/PackageManager;
      //   45: iconst_1
      //   46: anewarray 4	java/lang/Object
      //   49: dup
      //   50: iconst_0
      //   51: ldc 56
      //   53: aastore
      //   54: invokevirtual 62	java/lang/reflect/Method:invoke	(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
      //   57: checkcast 64	java/lang/Boolean
      //   60: invokevirtual 68	java/lang/Boolean:booleanValue	()Z
      //   63: istore 40
      //   65: iconst_0
      //   66: istore_3
      //   67: iload 40
      //   69: ifeq +5 -> 74
      //   72: iconst_1
      //   73: istore_3
      //   74: iload_3
      //   75: ifne +409 -> 484
      //   78: aload_1
      //   79: ldc 70
      //   81: invokevirtual 74	com/dynamixsoftware/printershare/ActivityDocsBrowser:getSystemService	(Ljava/lang/String;)Ljava/lang/Object;
      //   84: astore 23
      //   86: aload 23
      //   88: ifnull +396 -> 484
      //   91: aload 23
      //   93: invokevirtual 78	java/lang/Object:getClass	()Ljava/lang/Class;
      //   96: ldc 80
      //   98: iconst_0
      //   99: anewarray 42	java/lang/Class
      //   102: invokevirtual 48	java/lang/Class:getMethod	(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;
      //   105: astore 24
      //   107: aload 23
      //   109: invokevirtual 78	java/lang/Object:getClass	()Ljava/lang/Class;
      //   112: ldc 82
      //   114: iconst_1
      //   115: anewarray 42	java/lang/Class
      //   118: dup
      //   119: iconst_0
      //   120: ldc 44
      //   122: aastore
      //   123: invokevirtual 48	java/lang/Class:getMethod	(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;
      //   126: astore 25
      //   128: aload 24
      //   130: aload 23
      //   132: iconst_0
      //   133: anewarray 4	java/lang/Object
      //   136: invokevirtual 62	java/lang/reflect/Method:invoke	(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
      //   139: checkcast 84	[Ljava/lang/Object;
      //   142: checkcast 84	[Ljava/lang/Object;
      //   145: astore 26
      //   147: iconst_0
      //   148: istore 27
      //   150: iload 27
      //   152: aload 26
      //   154: arraylength
      //   155: if_icmpge +329 -> 484
      //   158: aload 26
      //   160: iload 27
      //   162: aaload
      //   163: invokevirtual 78	java/lang/Object:getClass	()Ljava/lang/Class;
      //   166: astore 28
      //   168: aload 28
      //   170: ldc 86
      //   172: iconst_0
      //   173: anewarray 42	java/lang/Class
      //   176: invokevirtual 48	java/lang/Class:getMethod	(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;
      //   179: aload 26
      //   181: iload 27
      //   183: aaload
      //   184: iconst_0
      //   185: anewarray 4	java/lang/Object
      //   188: invokevirtual 62	java/lang/reflect/Method:invoke	(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
      //   191: checkcast 44	java/lang/String
      //   194: astore 29
      //   196: aload 28
      //   198: ldc 88
      //   200: iconst_1
      //   201: anewarray 42	java/lang/Class
      //   204: dup
      //   205: iconst_0
      //   206: ldc 90
      //   208: aastore
      //   209: invokevirtual 48	java/lang/Class:getMethod	(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;
      //   212: aload 26
      //   214: iload 27
      //   216: aaload
      //   217: iconst_1
      //   218: anewarray 4	java/lang/Object
      //   221: dup
      //   222: iconst_0
      //   223: aload_1
      //   224: aastore
      //   225: invokevirtual 62	java/lang/reflect/Method:invoke	(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
      //   228: checkcast 44	java/lang/String
      //   231: astore 31
      //   233: aload 25
      //   235: aload 23
      //   237: iconst_1
      //   238: anewarray 4	java/lang/Object
      //   241: dup
      //   242: iconst_0
      //   243: aload 29
      //   245: aastore
      //   246: invokevirtual 62	java/lang/reflect/Method:invoke	(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
      //   249: checkcast 44	java/lang/String
      //   252: astore 32
      //   254: aload 32
      //   256: ifnull +160 -> 416
      //   259: aload 32
      //   261: ldc 92
      //   263: invokevirtual 96	java/lang/String:indexOf	(Ljava/lang/String;)I
      //   266: iflt +150 -> 416
      //   269: aload 31
      //   271: invokevirtual 100	java/lang/String:toLowerCase	()Ljava/lang/String;
      //   274: ldc 102
      //   276: invokevirtual 96	java/lang/String:indexOf	(Ljava/lang/String;)I
      //   279: ifge +16 -> 295
      //   282: aload 29
      //   284: invokevirtual 100	java/lang/String:toLowerCase	()Ljava/lang/String;
      //   287: ldc 102
      //   289: invokevirtual 96	java/lang/String:indexOf	(Ljava/lang/String;)I
      //   292: iflt +69 -> 361
      //   295: new 104	java/lang/StringBuilder
      //   298: dup
      //   299: invokespecial 105	java/lang/StringBuilder:<init>	()V
      //   302: aload 29
      //   304: invokevirtual 109	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
      //   307: ldc 111
      //   309: invokevirtual 109	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
      //   312: invokevirtual 114	java/lang/StringBuilder:toString	()Ljava/lang/String;
      //   315: astore 33
      //   317: new 116	java/io/File
      //   320: dup
      //   321: aload 33
      //   323: invokespecial 119	java/io/File:<init>	(Ljava/lang/String;)V
      //   326: astore 34
      //   328: aload 34
      //   330: invokevirtual 122	java/io/File:isDirectory	()Z
      //   333: ifeq +28 -> 361
      //   336: new 116	java/io/File
      //   339: dup
      //   340: aload 29
      //   342: invokespecial 119	java/io/File:<init>	(Ljava/lang/String;)V
      //   345: astore 35
      //   347: aload 35
      //   349: invokevirtual 126	java/io/File:list	()[Ljava/lang/String;
      //   352: arraylength
      //   353: iconst_1
      //   354: if_icmpne +7 -> 361
      //   357: aload 33
      //   359: astore 29
      //   361: getstatic 132	com/dynamixsoftware/printershare/App:ext_storage_root	Ljava/lang/String;
      //   364: aload 29
      //   366: invokevirtual 136	java/lang/String:equals	(Ljava/lang/Object;)Z
      //   369: ifeq +20 -> 389
      //   372: aload 31
      //   374: invokevirtual 100	java/lang/String:toLowerCase	()Ljava/lang/String;
      //   377: ldc 138
      //   379: invokevirtual 96	java/lang/String:indexOf	(Ljava/lang/String;)I
      //   382: iflt +7 -> 389
      //   385: ldc 140
      //   387: astore 31
      //   389: aload_0
      //   390: getfield 36	com/dynamixsoftware/printershare/ActivityDocsBrowser$DirAdapter:roots	Ljava/util/Vector;
      //   393: astore 36
      //   395: new 142	com/dynamixsoftware/printershare/ActivityDocsBrowser$Volume
      //   398: dup
      //   399: aload 31
      //   401: aload 29
      //   403: invokespecial 145	com/dynamixsoftware/printershare/ActivityDocsBrowser$Volume:<init>	(Ljava/lang/String;Ljava/lang/String;)V
      //   406: astore 37
      //   408: aload 36
      //   410: aload 37
      //   412: invokevirtual 148	java/util/Vector:add	(Ljava/lang/Object;)Z
      //   415: pop
      //   416: iinc 27 1
      //   419: goto -269 -> 150
      //   422: astore 39
      //   424: aload 39
      //   426: invokevirtual 151	java/lang/Exception:printStackTrace	()V
      //   429: aload 39
      //   431: invokestatic 155	com/dynamixsoftware/printershare/App:reportThrowable	(Ljava/lang/Throwable;)V
      //   434: iconst_0
      //   435: istore_3
      //   436: goto -362 -> 74
      //   439: astore 30
      //   441: aload 28
      //   443: ldc 88
      //   445: iconst_0
      //   446: anewarray 42	java/lang/Class
      //   449: invokevirtual 48	java/lang/Class:getMethod	(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;
      //   452: aload 26
      //   454: iload 27
      //   456: aaload
      //   457: iconst_0
      //   458: anewarray 4	java/lang/Object
      //   461: invokevirtual 62	java/lang/reflect/Method:invoke	(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
      //   464: checkcast 44	java/lang/String
      //   467: astore 31
      //   469: goto -236 -> 233
      //   472: astore 22
      //   474: aload 22
      //   476: invokevirtual 151	java/lang/Exception:printStackTrace	()V
      //   479: aload 22
      //   481: invokestatic 155	com/dynamixsoftware/printershare/App:reportThrowable	(Ljava/lang/Throwable;)V
      //   484: ldc 157
      //   486: ldc 159
      //   488: invokestatic 165	java/lang/System:getProperty	(Ljava/lang/String;)Ljava/lang/String;
      //   491: invokevirtual 136	java/lang/String:equals	(Ljava/lang/Object;)Z
      //   494: ifeq +60 -> 554
      //   497: new 116	java/io/File
      //   500: dup
      //   501: ldc 167
      //   503: invokespecial 119	java/io/File:<init>	(Ljava/lang/String;)V
      //   506: astore 4
      //   508: aload 4
      //   510: invokevirtual 170	java/io/File:exists	()Z
      //   513: ifeq +41 -> 554
      //   516: aload 4
      //   518: invokevirtual 122	java/io/File:isDirectory	()Z
      //   521: ifeq +33 -> 554
      //   524: aload 4
      //   526: invokevirtual 173	java/io/File:canRead	()Z
      //   529: ifeq +25 -> 554
      //   532: aload_0
      //   533: getfield 36	com/dynamixsoftware/printershare/ActivityDocsBrowser$DirAdapter:roots	Ljava/util/Vector;
      //   536: new 142	com/dynamixsoftware/printershare/ActivityDocsBrowser$Volume
      //   539: dup
      //   540: ldc 175
      //   542: aload 4
      //   544: invokevirtual 178	java/io/File:getAbsolutePath	()Ljava/lang/String;
      //   547: invokespecial 145	com/dynamixsoftware/printershare/ActivityDocsBrowser$Volume:<init>	(Ljava/lang/String;Ljava/lang/String;)V
      //   550: invokevirtual 148	java/util/Vector:add	(Ljava/lang/Object;)Z
      //   553: pop
      //   554: aload_0
      //   555: getfield 36	com/dynamixsoftware/printershare/ActivityDocsBrowser$DirAdapter:roots	Ljava/util/Vector;
      //   558: invokevirtual 182	java/util/Vector:size	()I
      //   561: ifne +235 -> 796
      //   564: new 33	java/util/Vector
      //   567: dup
      //   568: invokespecial 34	java/util/Vector:<init>	()V
      //   571: astore 5
      //   573: new 116	java/io/File
      //   576: dup
      //   577: ldc 184
      //   579: invokespecial 119	java/io/File:<init>	(Ljava/lang/String;)V
      //   582: astore 6
      //   584: aload 6
      //   586: invokevirtual 170	java/io/File:exists	()Z
      //   589: ifne +14 -> 603
      //   592: new 116	java/io/File
      //   595: dup
      //   596: ldc 186
      //   598: invokespecial 119	java/io/File:<init>	(Ljava/lang/String;)V
      //   601: astore 6
      //   603: aload 6
      //   605: invokevirtual 170	java/io/File:exists	()Z
      //   608: ifeq +85 -> 693
      //   611: new 188	java/io/FileInputStream
      //   614: dup
      //   615: aload 6
      //   617: invokespecial 191	java/io/FileInputStream:<init>	(Ljava/io/File;)V
      //   620: astore 15
      //   622: new 193	java/io/DataInputStream
      //   625: dup
      //   626: aload 15
      //   628: invokespecial 196	java/io/DataInputStream:<init>	(Ljava/io/InputStream;)V
      //   631: astore 16
      //   633: aload 16
      //   635: invokevirtual 199	java/io/DataInputStream:readLine	()Ljava/lang/String;
      //   638: astore 17
      //   640: aload 17
      //   642: ifnull +214 -> 856
      //   645: aload 17
      //   647: invokevirtual 202	java/lang/String:trim	()Ljava/lang/String;
      //   650: astore 18
      //   652: aload 18
      //   654: invokevirtual 205	java/lang/String:length	()I
      //   657: ifle -24 -> 633
      //   660: aload 18
      //   662: ldc 207
      //   664: invokevirtual 211	java/lang/String:startsWith	(Ljava/lang/String;)Z
      //   667: ifne -34 -> 633
      //   670: aload 5
      //   672: aload 18
      //   674: invokevirtual 148	java/util/Vector:add	(Ljava/lang/Object;)Z
      //   677: pop
      //   678: goto -45 -> 633
      //   681: astore 7
      //   683: aload 7
      //   685: invokevirtual 151	java/lang/Exception:printStackTrace	()V
      //   688: aload 7
      //   690: invokestatic 155	com/dynamixsoftware/printershare/App:reportThrowable	(Ljava/lang/Throwable;)V
      //   693: new 116	java/io/File
      //   696: dup
      //   697: ldc 213
      //   699: invokespecial 119	java/io/File:<init>	(Ljava/lang/String;)V
      //   702: astore 8
      //   704: aload 8
      //   706: invokevirtual 170	java/io/File:exists	()Z
      //   709: ifne +14 -> 723
      //   712: new 116	java/io/File
      //   715: dup
      //   716: ldc 215
      //   718: invokespecial 119	java/io/File:<init>	(Ljava/lang/String;)V
      //   721: astore 8
      //   723: aload 8
      //   725: invokevirtual 170	java/io/File:exists	()Z
      //   728: ifeq +68 -> 796
      //   731: invokestatic 221	java/lang/Runtime:getRuntime	()Ljava/lang/Runtime;
      //   734: aload 8
      //   736: invokevirtual 178	java/io/File:getAbsolutePath	()Ljava/lang/String;
      //   739: invokevirtual 225	java/lang/Runtime:exec	(Ljava/lang/String;)Ljava/lang/Process;
      //   742: astore 12
      //   744: new 227	com/dynamixsoftware/printershare/ActivityDocsBrowser$DirAdapter$1
      //   747: dup
      //   748: aload_0
      //   749: aload_1
      //   750: aload 12
      //   752: aload 5
      //   754: invokespecial 230	com/dynamixsoftware/printershare/ActivityDocsBrowser$DirAdapter$1:<init>	(Lcom/dynamixsoftware/printershare/ActivityDocsBrowser$DirAdapter;Lcom/dynamixsoftware/printershare/ActivityDocsBrowser;Ljava/lang/Process;Ljava/util/Vector;)V
      //   757: astore 13
      //   759: aload 13
      //   761: invokevirtual 235	java/lang/Thread:start	()V
      //   764: aload 12
      //   766: invokevirtual 240	java/lang/Process:waitFor	()I
      //   769: pop
      //   770: aload 13
      //   772: invokevirtual 243	java/lang/Thread:isAlive	()Z
      //   775: ifeq +21 -> 796
      //   778: invokestatic 246	java/lang/Thread:yield	()V
      //   781: goto -11 -> 770
      //   784: astore 9
      //   786: aload 9
      //   788: invokevirtual 151	java/lang/Exception:printStackTrace	()V
      //   791: aload 9
      //   793: invokestatic 155	com/dynamixsoftware/printershare/App:reportThrowable	(Ljava/lang/Throwable;)V
      //   796: aload_0
      //   797: getfield 36	com/dynamixsoftware/printershare/ActivityDocsBrowser$DirAdapter:roots	Ljava/util/Vector;
      //   800: invokevirtual 182	java/util/Vector:size	()I
      //   803: ifne +22 -> 825
      //   806: aload_0
      //   807: getfield 36	com/dynamixsoftware/printershare/ActivityDocsBrowser$DirAdapter:roots	Ljava/util/Vector;
      //   810: new 142	com/dynamixsoftware/printershare/ActivityDocsBrowser$Volume
      //   813: dup
      //   814: ldc 248
      //   816: ldc 250
      //   818: invokespecial 145	com/dynamixsoftware/printershare/ActivityDocsBrowser$Volume:<init>	(Ljava/lang/String;Ljava/lang/String;)V
      //   821: invokevirtual 148	java/util/Vector:add	(Ljava/lang/Object;)Z
      //   824: pop
      //   825: aload_0
      //   826: getfield 36	com/dynamixsoftware/printershare/ActivityDocsBrowser$DirAdapter:roots	Ljava/util/Vector;
      //   829: invokevirtual 182	java/util/Vector:size	()I
      //   832: iconst_1
      //   833: if_icmpne +31 -> 864
      //   836: aload_0
      //   837: getfield 36	com/dynamixsoftware/printershare/ActivityDocsBrowser$DirAdapter:roots	Ljava/util/Vector;
      //   840: iconst_0
      //   841: invokevirtual 254	java/util/Vector:elementAt	(I)Ljava/lang/Object;
      //   844: checkcast 142	com/dynamixsoftware/printershare/ActivityDocsBrowser$Volume
      //   847: astore 10
      //   849: aload_0
      //   850: aload 10
      //   852: invokevirtual 257	com/dynamixsoftware/printershare/ActivityDocsBrowser$DirAdapter:changeDir	(Ljava/io/File;)V
      //   855: return
      //   856: aload 16
      //   858: invokevirtual 260	java/io/DataInputStream:close	()V
      //   861: goto -168 -> 693
      //   864: aconst_null
      //   865: astore 10
      //   867: goto -18 -> 849
      //   870: astore 21
      //   872: goto -388 -> 484
      //   875: astore_2
      //   876: iconst_0
      //   877: istore_3
      //   878: goto -804 -> 74
      // Local variable table:
      //   start	length	slot	name	signature
      //   0	881	0	this	DirAdapter
      //   0	881	1	this$1	ActivityDocsBrowser
      //   875	1	2	localNoSuchMethodException1	java.lang.NoSuchMethodException
      //   66	812	3	i	int
      //   506	37	4	localFile1	File
      //   571	182	5	localVector1	Vector
      //   582	34	6	localFile2	File
      //   681	8	7	localException1	Exception
      //   702	33	8	localFile3	File
      //   784	8	9	localException2	Exception
      //   847	19	10	localVolume1	ActivityDocsBrowser.Volume
      //   742	23	12	localProcess	Process
      //   757	14	13	local1	1
      //   620	7	15	localFileInputStream	java.io.FileInputStream
      //   631	226	16	localDataInputStream	DataInputStream
      //   638	8	17	str1	String
      //   650	23	18	str2	String
      //   870	1	21	localNoSuchMethodException2	java.lang.NoSuchMethodException
      //   472	8	22	localException3	Exception
      //   84	152	23	localObject1	Object
      //   105	24	24	localMethod1	java.lang.reflect.Method
      //   126	108	25	localMethod2	java.lang.reflect.Method
      //   145	308	26	arrayOfObject	Object[]
      //   148	307	27	j	int
      //   166	276	28	localClass	java.lang.Class
      //   194	208	29	localObject2	Object
      //   439	1	30	localNoSuchMethodException3	java.lang.NoSuchMethodException
      //   231	237	31	str3	String
      //   252	8	32	str4	String
      //   315	43	33	str5	String
      //   326	3	34	localFile4	File
      //   345	3	35	localFile5	File
      //   393	16	36	localVector2	Vector
      //   406	5	37	localVolume2	ActivityDocsBrowser.Volume
      //   422	8	39	localException4	Exception
      //   63	5	40	bool	boolean
      // Exception table:
      //   from	to	target	type
      //   25	65	422	java/lang/Exception
      //   196	233	439	java/lang/NoSuchMethodException
      //   78	86	472	java/lang/Exception
      //   91	147	472	java/lang/Exception
      //   150	196	472	java/lang/Exception
      //   196	233	472	java/lang/Exception
      //   233	254	472	java/lang/Exception
      //   259	295	472	java/lang/Exception
      //   295	357	472	java/lang/Exception
      //   361	385	472	java/lang/Exception
      //   389	416	472	java/lang/Exception
      //   441	469	472	java/lang/Exception
      //   573	603	681	java/lang/Exception
      //   603	633	681	java/lang/Exception
      //   633	640	681	java/lang/Exception
      //   645	678	681	java/lang/Exception
      //   856	861	681	java/lang/Exception
      //   693	723	784	java/lang/Exception
      //   723	770	784	java/lang/Exception
      //   770	781	784	java/lang/Exception
      //   78	86	870	java/lang/NoSuchMethodException
      //   91	147	870	java/lang/NoSuchMethodException
      //   150	196	870	java/lang/NoSuchMethodException
      //   233	254	870	java/lang/NoSuchMethodException
      //   259	295	870	java/lang/NoSuchMethodException
      //   295	357	870	java/lang/NoSuchMethodException
      //   361	385	870	java/lang/NoSuchMethodException
      //   389	416	870	java/lang/NoSuchMethodException
      //   441	469	870	java/lang/NoSuchMethodException
      //   25	65	875	java/lang/NoSuchMethodException
    }
    
    public boolean areAllItemsEnabled()
    {
      return true;
    }
    
    public void changeDir(File paramFile)
    {
      if ((paramFile != null) && ("/".equals(paramFile.getAbsolutePath()))) {
        paramFile = null;
      }
      this.curr = paramFile;
      if (paramFile != null)
      {
        int k;
        Vector localVector1;
        Vector localVector2;
        File[] arrayOfFile;
        for (int i = 0;; i++)
        {
          int j = this.roots.size();
          k = 0;
          if (i < j)
          {
            if (((ActivityDocsBrowser.Volume)this.roots.elementAt(i)).equals(paramFile))
            {
              k = 1;
              ActivityDocsBrowser.this.setTitle(ActivityDocsBrowser.this.getResources().getString(2131099702) + " - " + ((ActivityDocsBrowser.Volume)this.roots.elementAt(i)).getVolumeName());
            }
          }
          else
          {
            localVector1 = new Vector();
            localVector2 = new Vector();
            arrayOfFile = paramFile.listFiles();
            if (arrayOfFile == null) {
              break label260;
            }
            for (int m = 0; m < arrayOfFile.length; m++) {
              if ((arrayOfFile[m].isDirectory()) && (arrayOfFile[m].canRead())) {
                localVector1.add(arrayOfFile[m]);
              }
            }
          }
        }
        for (int n = 0; n < arrayOfFile.length; n++) {
          if ((!arrayOfFile[n].isDirectory()) && (arrayOfFile[n].canRead())) {
            localVector2.add(arrayOfFile[n]);
          }
        }
        label260:
        Comparator local2 = new Comparator()
        {
          public int compare(File paramAnonymousFile1, File paramAnonymousFile2)
          {
            return paramAnonymousFile1.getName().compareToIgnoreCase(paramAnonymousFile2.getName());
          }
        };
        Collections.sort(localVector1, local2);
        Collections.sort(localVector2, local2);
        this.files = new Vector();
        if (k == 0)
        {
          this.files.add(paramFile.getParentFile());
          this.files.addAll(localVector1);
          this.files.addAll(localVector2);
        }
      }
      for (;;)
      {
        fireOnChanged();
        return;
        if (this.roots.size() <= 1) {
          break;
        }
        this.files.add(new File("/"));
        break;
        ActivityDocsBrowser.this.setTitle(2131099702);
        this.files = new Vector();
        this.files.addAll(this.roots);
      }
    }
    
    public void fireOnChanged()
    {
      if (this.observers != null)
      {
        int i = this.observers.size();
        for (int j = 0; j < i; j++) {
          ((DataSetObserver)this.observers.get(j)).onChanged();
        }
      }
    }
    
    public int getCount()
    {
      return this.files.size();
    }
    
    public Object getItem(int paramInt)
    {
      return this.files.get(paramInt);
    }
    
    public long getItemId(int paramInt)
    {
      return ((File)this.files.get(paramInt)).getAbsolutePath().hashCode() << paramInt + 16;
    }
    
    public int getItemViewType(int paramInt)
    {
      return 0;
    }
    
    public View getView(int paramInt, View paramView, ViewGroup paramViewGroup)
    {
      LinearLayout localLinearLayout = (LinearLayout)paramView;
      ImageView localImageView;
      TextView localTextView;
      int i;
      String str1;
      label160:
      label225:
      String str2;
      if (localLinearLayout == null)
      {
        localLinearLayout = new LinearLayout(ActivityDocsBrowser.this);
        localLinearLayout.setOrientation(0);
        localImageView = new ImageView(ActivityDocsBrowser.this);
        localLinearLayout.addView(localImageView, new LinearLayout.LayoutParams(-2, -2));
        localTextView = new TextView(ActivityDocsBrowser.this);
        localTextView.setGravity(16);
        localTextView.setTextSize(1, 18.0F);
        localTextView.setSingleLine();
        localTextView.setTextColor(-4276546);
        localLinearLayout.addView(localTextView, new LinearLayout.LayoutParams(-2, -1));
        i = 2130837540;
        str1 = ((File)this.files.get(paramInt)).getName().toLowerCase();
        if (!str1.endsWith(".txt")) {
          break label358;
        }
        i = 2130837546;
        if (((File)this.files.get(paramInt)).isDirectory())
        {
          if ((this.curr == null) || (paramInt != 0) || ((this.roots.size() == 1) && (((ActivityDocsBrowser.Volume)this.roots.elementAt(0)).equals(this.curr)))) {
            break label516;
          }
          i = 2130837573;
        }
        if ((localImageView.getTag() == null) || (i != ((Integer)localImageView.getTag()).intValue()))
        {
          localImageView.setTag(Integer.valueOf(i));
          localImageView.setImageResource(i);
        }
        localLinearLayout.setTag(Integer.valueOf(paramInt));
        if (this.curr == null) {
          break label543;
        }
        if ((paramInt != 0) || ((this.roots.size() == 1) && (((ActivityDocsBrowser.Volume)this.roots.elementAt(0)).equals(this.curr)))) {
          break label524;
        }
        str2 = "..";
      }
      for (;;)
      {
        localTextView.setText(str2);
        return localLinearLayout;
        localImageView = (ImageView)localLinearLayout.getChildAt(0);
        localTextView = (TextView)localLinearLayout.getChildAt(1);
        break;
        label358:
        if (str1.endsWith(".pdf"))
        {
          i = 2130837544;
          break label160;
        }
        if ((str1.endsWith(".png")) || (str1.endsWith(".jpg")))
        {
          i = 2130837543;
          break label160;
        }
        if ((str1.endsWith(".doc")) || (str1.endsWith(".docx")))
        {
          i = 2130837539;
          break label160;
        }
        if ((str1.endsWith(".xls")) || (str1.endsWith(".xlsx")))
        {
          i = 2130837547;
          break label160;
        }
        if ((str1.endsWith(".ppt")) || (str1.endsWith(".pptx")))
        {
          i = 2130837545;
          break label160;
        }
        if (!str1.endsWith(".hwp")) {
          break label160;
        }
        i = 2130837542;
        break label160;
        label516:
        i = 2130837541;
        break label225;
        label524:
        str2 = ((File)this.files.get(paramInt)).getName();
        continue;
        label543:
        str2 = ((ActivityDocsBrowser.Volume)this.files.get(paramInt)).getVolumeName();
      }
    }
    
    public int getViewTypeCount()
    {
      return 1;
    }
    
    public boolean hasStableIds()
    {
      return false;
    }
    
    public boolean isEmpty()
    {
      return this.files.size() == 0;
    }
    
    public boolean isEnabled(int paramInt)
    {
      File localFile = (File)this.files.get(paramInt);
      String str = localFile.getName().toLowerCase();
      return (localFile.isDirectory()) || (str.endsWith(".jpg")) || (str.endsWith(".png")) || (str.endsWith(".txt")) || (str.endsWith(".pdf")) || (str.endsWith(".doc")) || (str.endsWith(".docx")) || (str.endsWith(".xls")) || (str.endsWith(".xlsx")) || (str.endsWith(".ppt")) || (str.endsWith(".pptx")) || (str.endsWith(".hwp"));
    }
    
    public void registerDataSetObserver(DataSetObserver paramDataSetObserver)
    {
      if (this.observers == null) {
        this.observers = new ArrayList();
      }
      if (!this.observers.contains(paramDataSetObserver)) {
        this.observers.add(paramDataSetObserver);
      }
    }
    
    public void unregisterDataSetObserver(DataSetObserver paramDataSetObserver)
    {
      if (this.observers == null) {
        return;
      }
      this.observers.remove(paramDataSetObserver);
    }
  }
  
  static class Volume
    extends File
  {
    public String name;
    
    public Volume(String paramString1, String paramString2)
    {
      super();
      this.name = paramString1;
    }
    
    public String getVolumeName()
    {
      if (this.name != null) {
        return this.name;
      }
      return getAbsolutePath();
    }
  }
}


/* Location:           C:\Users\Admin\Desktop\Decompiler\JAD\jd-gui-0.3.6.windows\classes_dex2jar.jar
 * Qualified Name:     com.dynamixsoftware.printershare.ActivityDocsBrowser
 * JD-Core Version:    0.7.0.1
 */